package com.bykj.property.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.bykj.property.controller.vo.request.PmProprietorPageRequest;
import com.bykj.property.mapper.provider.PendingPaymentRecordSql;
import com.bykj.property.mapper.provider.PmProprietorSql;
import com.bykj.property.model.PmProprietor;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;

/**
* <p>
    * 业主信息表 Mapper 接口
    * </p>
*
* @author liangyiming
* @since 2019-06-20
*/
public interface PmProprietorMapper extends BaseMapper<PmProprietor> {

    @SelectProvider(type= PmProprietorSql.class, method = "getSql")
                @Results({
                        @Result(property = "pmUnitId",column = "pm_unit_id"),
                        @Result(property = "pmVillageId",column = "pm_village_id"),
                        @Result(property = "pmVillage",column = "pm_village_id",one = @One(select = "com.bykj.property.mapper.PmVillageMapper.selectById"))
                ,@Result(property = "pmUnit",column = "pm_unit_id",one = @One(select = "com.bykj.property.mapper.PmUnitMapper.selectById"))
    })
    Page<PmProprietor> queryPage(PmProprietorPageRequest pageRequest);

}